package org.gap.wizards.items;

import org.gap.wizards.creature.Creature.Attribute;
import org.gap.wizards.effects.Effect;
import org.gap.wizards.items.construction.ElixerInstructions;
import org.gap.wizards.items.construction.MakingStation;
import org.gap.wizards.items.effects.DecreaseAttribute;
import org.gap.wizards.items.effects.IncreaseAttribute;
import org.gap.wizards.items.effects.LimitedUse;
import org.gap.wizards.utils.Dice;
import org.gap.wizards.views.ViewPlatform.Color;

public class ItemFactory {

	public static Item dummyItem() {
		return new Item(Effect.NONE, new Description("sword", 's', Color.GRAY));
	}

	public static Item healingPotion() {
		IncreaseAttribute effect = new IncreaseAttribute(Attribute.Hitpoints, Dice.D6);
		Description description = new Description("Healing potion", '!', Color.RED);
		Item item = new Item(effect, description);
		item.setUses(LimitedUse.single());
		return item;
	}

	public static Item shortSword() {
		return new Item(new DecreaseAttribute(Attribute.Hitpoints, Dice.D6), new Description("Short sword", ')', Color.GRAY, true));
	}

	public static Item greenLeaves() {
		Description description = new Description("Green leaves", '%', Color.GREEN);
		Item item = new Item(Effect.NONE, description);
		item.setUses(LimitedUse.single());
		return item;
	}

	public static Item beesWax() {
		Description description = new Description("Bees Wax", '%', Color.YELLOW);
		Item item = new Item(Effect.NONE, description);
		item.setUses(LimitedUse.single());
		return item;
	}
	
	public static ElixerInstructions healingElixerInstructions() {
		Description description = new Description("Healing Elixer", '=', Color.YELLOW);
		return new ElixerInstructions(description, healingPotion(), "Alchemy", +2, greenLeaves(), beesWax());
	}

	public static MakingStation createAlchemyLab() {
		Description description = new Description("Alchemy Lab", '&', Color.BLUE);
		MakingStation makingStation = new MakingStation(description);
		
//		Instructions recipe = new ElixerInstructions(healingPotion(), "Alchemy", +2, greenLeaves(), beesWax());
		
		return makingStation;
	}
}
